package com.designCreator.view
{
	import com.designCreator.controls.StyleTabContent;
	import com.designCreator.notifications.NotificationNames;
	
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;
	
	public class StyleTabContentMediator extends Mediator implements IMediator
	{
		public static const NAME : String = "StyleTabContentMediator";
		
		public function get styleTabContent() : StyleTabContent
		{
			return viewComponent as StyleTabContent;
		}
		
		public function StyleTabContentMediator( styleTabContent : StyleTabContent )
		{
			super( NAME, styleTabContent );
		}
		
		override public function onRegister():void
		{
		}
		
		override public function listNotificationInterests() : Array
		{
			return [
				NotificationNames.LOAD_STYLE_L1_DATA_FAILURE,
				NotificationNames.LOAD_STYLE_L1_DATA_SUCCESS,
				NotificationNames.LOAD_STYLE_L2_DATA_FAILURE,
				NotificationNames.LOAD_STYLE_L2_DATA_SUCCESS
			];
		}
		
		override public function handleNotification( note : INotification ) : void
		{
			switch ( note.getName() )
			{
				case NotificationNames.LOAD_STYLE_L1_DATA_FAILURE:
					//flexcaster.views.selectedIndex = FEEDS_VIEW;
					break;
				
				case NotificationNames.LOAD_STYLE_L1_DATA_SUCCESS:
					//flexcaster.views.selectedIndex = FEED_VIEW;
					break;
				
				case NotificationNames.LOAD_STYLE_L2_DATA_FAILURE:
					//flexcaster.views.selectedIndex = PODCAST_VIEW;
					break;
				case NotificationNames.LOAD_STYLE_L2_DATA_SUCCESS:
					//flexcaster.views.selectedIndex = PODCAST_VIEW;
					break;
				
			}
		}
	}
}